Generative neural network distillation

ABSTRACT

A compact generative neural network can be distilled from a teacher generative neural network using a training network. The compact network can be trained on the input data and output data of the teacher network. The training network train the student network using a discrimination layer and one or more types of losses, such as perception loss and adversarial loss.

TECHNICAL FIELD

Embodiments of the present disclosure relate generally to machinelearning and, more particularly, but not by way of limitation, toimplementing compact generative neural networks.

BACKGROUND

Machine learning schemes can be trained to perform image processingtasks, such as image style transfer. For example, a neural network canbe trained to modify an image so that the image appears as if it waspainted in the style of a famous painter (e.g., Monet). These machinelearning schemes often have large memory requirements which can makethem ill-suited for execution on client devices, such as smartphones,tablets, and laptops.

BRIEF DESCRIPTION OF THE DRAWINGS

To easily identify the discussion of any particular element or act, themost significant digit or digits in a reference number refer to thefigure (“FIG.”) number in which that element or act is first introduced.

FIG. 1 is a block diagram showing an example messaging system forexchanging data (e.g., messages and associated content) over a network.

FIG. 2 is block diagram illustrating further details regarding amessaging system having an integrated virtual object machine learningsystem, according to example embodiments.

FIG. 3 is a schematic diagram illustrating data which may be stored in adatabase of a messaging server system, according to certain exampleembodiments.

FIG. 4 is a schematic diagram illustrating a structure of a message,according to some embodiments, generated by a messaging clientapplication for communication.

FIG. 5 is a schematic diagram illustrating an example access-limitingprocess, in terms of which access to content (e.g., an ephemeralmessage, and associated multimedia payload of data) or a contentcollection (e.g., an ephemeral message story) may be time-limited (e.g.,made ephemeral).

FIG. 6B shows example internal engines of a client generativedistillation system, according to some example embodiments.

FIG. 6A shows internal functional engines of a generative distillationsystem, according to some example embodiments.

FIG. 7 illustrates a flow diagram of a method for implementing compactgenerative neural networks, according to some example embodiments.

FIG. 8 shows example training data structure, according to some exampleembodiments.

FIG. 9 shows a generative training network, according to some exampleembodiments.

FIG. 10 shows a flow diagram of a method for selection of a studentgenerative neural network to perform processing, according to someexample embodiments.

FIG. 11 shows an example user interface for implementing multiplestudent neural networks, according to some example embodiments.

FIG. 12 shows an example flow diagram of a method for selecting astudent neural network using detected features, according to someexample embodiments.

FIGS. 13A and 13B shows an example user interface for implementing astudent neural network, according to some example embodiments.

FIG. 14 is a block diagram illustrating a representative softwarearchitecture, which may be used in conjunction with various hardwarearchitectures herein described.

FIG. 15 is a block diagram illustrating components of a machine,according to some example embodiments, able to read instructions from amachine-readable medium (e.g., a machine-readable storage medium) andperform any one or more of the methodologies discussed herein.

DETAILED DESCRIPTION

The description that follows includes systems, methods, techniques,instruction sequences, and computing machine program products thatembody illustrative embodiments of the disclosure. In the followingdescription, for the purposes of explanation, numerous specific detailsare set forth in order to provide an understanding of variousembodiments of the inventive subject matter. It will be evident,however, to those skilled in the art, that embodiments of the inventivesubject matter may be practiced without these specific details. Ingeneral, well-known instruction instances, protocols, structures, andtechniques are not necessarily shown in detail.

As discussed, some machine learning schemes have large memoryrequirements that limit their use on computers with limited resources(e.g., a smartphone). To this end, a generative distillation system cangenerate a compact generative neural network by training a studentgenerative neural network (GNN) on training data using a trainingnetwork. The training data can be generated by a pre-trained teacher GNN(e.g., a large generative neural network trained to perform a certaintask). Generative neural networks are neural network that generateoutput data by modifying or otherwise processing input data. One exampleof a generative neural network includes a convolutional neural networkthat is configured to perform image style transfer, e.g., stylize animage to mimic the style of the painter Monet. An example of anon-generative neural network includes an object classification neuralnetwork, which can identify an object in an image and generatelikelihoods that the object is a car, an apple, and so on.

In some example embodiments, a student GNN is trained on the input dataand output data from the teacher GNN. The input data is the data that isinput into the teacher GNN (e.g., photos of landscapes) and the outputdata is the data output from the teacher GNN (e.g., modified photos oflandscapes in the style of Monet). In some example embodiments, ateacher GNN is first trained on a limited set of training data, such asa small set of images of real Monet paintings. After the teacher GNN istrained, it can be used to generate a larger set of training images foruse in training the student GNN. In particular, for example, the teacherGNN can be applied to a large set of input images to generate a largeset of output images. The large set of input images and output imagescan be stored as student training data. In this way, even if an initialset of training data is small, a larger set can be created utilizing thetrained teacher network. In some example embodiments, the internalconfiguration of the teacher GNN is unknown. In those exampleembodiments, training data can still be generated by inputting imagesinto the pre-trained teacher GNN to yield output images, and storing theinput and output data as training data for use in the student trainingnetwork.

In some example embodiments, the training network includes the studentGNN to be trained and a discrimination layer. The discrimination layercan receive output data from the student GNN and compare the output datato target data (e.g., ground truth data) from the teacher GNN. Thestudent GNN can be trained with one or more losses, such as perceptionloss, task specific adversarial loss, task specific teeth loss, andhigh-frequency loss. In this way, a compact student GNN can replicatethe results of a full size teacher GNN model can be distilled to acompact student GNN model (e.g., model size can be reduced from 30-300Mb teacher GNN to 500-2000 Kb student GNN) while maintainingsatisfactory generative result data.

FIG. 1 is a block diagram showing an example messaging system 100 forexchanging data (e.g., messages and associated content) over a network.The messaging system 100 includes multiple user devices, such as clientdevices 102, each of which hosts a number of applications including amessaging client application 104. Each messaging client application 104is communicatively coupled to other instances of the messaging clientapplication 104 and a messaging server system 108 via a network 106(e.g., the Internet).

Accordingly, each messaging client application 104 is able tocommunicate and exchange data with another messaging client application104 and with the messaging server system 108 via the network 106. Thedata exchanged between messaging client devices 102, and between amessaging client application 104 and the messaging server system 108,includes functions (e.g., commands to invoke functions) as well aspayload data (e.g., text, audio, video, or other multimedia data).

The messaging server system 108 provides server-side functionality viathe network 106 to a particular messaging client application 104. Whilecertain functions of the messaging system 100 are described herein asbeing performed by either a messaging client application 104 or by themessaging server system 108, it will be appreciated that the location ofcertain functionality within either the messaging client application 104or the messaging server system 108 is a design choice. For example, itmay be technically preferable to initially deploy certain technology andfunctionality within the messaging server system 108, and to latermigrate this technology and functionality to the messaging clientapplication 104 where a client device 102 has a sufficient processingcapacity.

The messaging server system 108 supports various services and operationsthat are provided to the messaging client application 104. Suchoperations include transmitting data to, receiving data from, andprocessing data generated by the messaging client application 104. Thisdata may include message content, client device information, geolocationinformation, media annotation and overlays, message content persistenceconditions, social network information, and live event information, asexamples. Data exchanges within the messaging system 100 are invoked andcontrolled through functions available via user interfaces (UIs) of themessaging client application 104.

Turning now specifically to the messaging server system 108, anapplication programming interface (API) server 110 is coupled to, andprovides a programmatic interface to, an application server 112. Theapplication server 112 is communicatively coupled to a database server118, which facilitates access to a database 120 in which is stored dataassociated with messages processed by the application server 112.

The API server 110 receives and transmits message data (e.g., commandsand message payloads) between the client devices 102 and the applicationserver 112. Specifically, the API server 110 provides a set ofinterfaces (e.g., routines and protocols) that can be called or queriedby the messaging client application 104 in order to invoke functionalityof the application server 112. The API server 110 exposes variousfunctions supported by the application server 112, including accountregistration; login functionality; the sending of messages, via theapplication server 112, from a particular messaging client application104 to another messaging client application 104; the sending of mediafiles (e.g., images or video) from a messaging client application 104 toa messaging server application 114 for possible access by anothermessaging client application 104; the setting of a collection of mediadata (e.g., a story); the retrieval of such collections; the retrievalof a list of friends of a user of a client device 102; the retrieval ofmessages and content; the adding and deletion of friends to and from asocial graph; the location of friends within the social graph; andopening application events (e.g., relating to the messaging clientapplication 104).

The application server 112 hosts a number of applications andsubsystems, including the messaging server application 114, an imageprocessing system 116, a social network system 122, and a generativedistillation system 150. The messaging server application 114 implementsa number of message-processing technologies and functions, particularlyrelated to the aggregation and other processing of content (e.g.,textual and multimedia content) included in messages received frommultiple instances of the messaging client application 104. As will bedescribed in further detail, the text and media content from multiplesources may be aggregated into collections of content (e.g., calledstories or galleries). These collections are then made available, by themessaging server application 114, to the messaging client application104. Other processor- and memory-intensive processing of data may alsobe performed server-side by the messaging server application 114, inview of the hardware requirements for such processing.

The application server 112 also includes the image processing system116, which is dedicated to performing various image processingoperations, typically with respect to images or video received withinthe payload of a message at the messaging server application 114.

The social network system 122 supports various social networkingfunctions and services, and makes these functions and services availableto the messaging server application 114. To this end, the social networksystem 122 maintains and accesses an entity graph (e.g., entity graph304 in FIG. 3) within the database 120. Examples of functions andservices supported by the social network system 122 include theidentification of other users of the messaging system 100 with whom aparticular user has relationships or whom the particular user is“following,” and also the identification of other entities and interestsof a particular user.

The generative distillation system 150 is configured to train studentneural networks using data from teacher neural networks, as discussed infurther detail below.

The application server 112 is communicatively coupled to a databaseserver 118, which facilitates access to a database 120 in which isstored data associated with messages processed by the messaging serverapplication 114.

FIG. 2 is block diagram illustrating further details regarding themessaging system 100, according to example embodiments. Specifically,the messaging system 100 is shown to comprise the messaging clientapplication 104 and the application server 112, which in turn embody anumber of subsystems, namely an ephemeral timer system 202, a collectionmanagement system 204, an annotation system 206, and a client generativedistillation system 210.

The ephemeral timer system 202 is responsible for enforcing thetemporary access to content permitted by the messaging clientapplication 104 and the messaging server application 114. To this end,the ephemeral timer system 202 incorporates a number of timers that,based on duration and display parameters associated with a message orcollection of messages (e.g., a story), selectively display and enableaccess to messages and associated content via the messaging clientapplication 104. Further details regarding the operation of theephemeral timer system 202 are provided below.

The collection management system 204 is responsible for managingcollections of media (e.g., collections of text, image, video, and audiodata). In some examples, a collection of content (e.g., messages,including images, video, text, and audio) may be organized into an“event gallery” or an “event story.” Such a collection may be madeavailable for a specified time period, such as the duration of an eventto which the content relates. For example, content relating to a musicconcert may be made available as a “story” for the duration of thatmusic concert. The collection management system 204 may also beresponsible for publishing an icon that provides notification of theexistence of a particular collection to the user interface of themessaging client application 104.

The collection management system 204 furthermore includes a curationinterface 208 that allows a collection manager to manage and curate aparticular collection of content. For example, the curation interface208 enables an event organizer to curate a collection of contentrelating to a specific event (e.g., delete inappropriate content orredundant messages). Additionally, the collection management system 204employs machine vision (or image recognition technology) and contentrules to automatically curate a content collection. In certainembodiments, compensation may be paid to a user for inclusion ofuser-generated content into a collection. In such cases, the curationinterface 208 operates to automatically make payments to such users forthe use of their content.

The annotation system 206 provides various functions that enable a userto annotate or otherwise modify or edit media content associated with amessage. For example, the annotation system 206 provides functionsrelated to the generation and publishing of media overlays for messagesprocessed by the messaging system 100. The annotation system 206operatively supplies a media overlay (e.g., a geofilter or filter) tothe messaging client application 104 based on a geolocation of theclient device 102. In another example, the annotation system 206operatively supplies a media overlay to the messaging client application104 based on other information, such as social network information ofthe user of the client device 102 or a venue selected by the clientgenerative distillation system 210. A media overlay may include audioand visual content and visual effects. Examples of audio and visualcontent include pictures, text, logos, animations, and sound effects. Anexample of a visual effect includes color overlaying. The audio andvisual content or the visual effects can be applied to a media contentitem (e.g., a photo) at the client device 102. For example, the mediaoverlay includes text that can be overlaid on top of a photographgenerated by the client device 102. In another example, the mediaoverlay includes an identification of a location (e.g., Venice Beach), aname of a live event, or a name of a merchant (e.g., Beach CoffeeHouse). In another example, the annotation system 206 uses thegeolocation of the client device 102 to identify a media overlay thatincludes the name of a merchant at the geolocation of the client device102. The media overlay may include other indicia associated with themerchant. The media overlays may be stored in the database 120 andaccessed through the database server 118.

In one example embodiment, the annotation system 206 provides auser-based publication platform that enables users to select ageolocation on a map and upload content associated with the selectedgeolocation. The user may also specify circumstances under whichparticular content should be offered to other users. The annotationsystem 206 generates a media overlay that includes the uploaded contentand associates the uploaded content with the selected geolocation.

In another example embodiment, the annotation system 206 provides amerchant-based publication platform that enables merchants to select aparticular media overlay associated with a geolocation via a biddingprocess. For example, the annotation system 206 associates the mediaoverlay of a highest-bidding merchant with a corresponding geolocationfor a predefined amount of time.

FIG. 3 is a schematic diagram illustrating data 300 which may be storedin the database 120 of the messaging server system 108, according tocertain example embodiments. While the content of the database 120 isshown to comprise a number of tables, it will be appreciated that thedata could be stored in other types of data structures (e.g., as anobject-oriented database).

The database 120 includes message data stored within a message table314. An entity table 302 stores entity data, including an entity graph304. Entities for which records are maintained within the entity table302 may include individuals, corporate entities, organizations, objects,places, events, and so forth. Regardless of type, any entity regardingwhich the messaging server system 108 stores data may be a recognizedentity. Each entity is provided with a unique identifier, as well as anentity type identifier (not shown).

The entity graph 304 furthermore stores information regardingrelationships and associations between or among entities. Suchrelationships may be social, professional (e.g., work at a commoncorporation or organization), interest-based, or activity-based, forexample.

The database 120 also stores annotation data, in the example form offilters, in an annotation table 312. Filters for which data is storedwithin the annotation table 312 are associated with and applied tovideos (for which data is stored in a video table 310) and/or images(for which data is stored in an image table 308). Filters, in oneexample, are overlays that are displayed as overlaid on an image orvideo during presentation to a recipient user. Filters may be of varioustypes, including user-selected filters from a gallery of filterspresented to a sending user by the messaging client application 104 whenthe sending user is composing a message. Other types of filters includegeolocation filters (also known as geo-filters), which may be presentedto a sending user based on geographic location. For example, geolocationfilters specific to a neighborhood or special location may be presentedwithin a user interface by the messaging client application 104, basedon geolocation information determined by a Global Positioning System(GPS) unit of the client device 102. Another type of filter is a datafilter, which may be selectively presented to a sending user by themessaging client application 104, based on other inputs or informationgathered by the client device 102 during the message creation process.Examples of data filters include a current temperature at a specificlocation, a current speed at which a sending user is traveling, abattery life for a client device 102, or the current time.

Other annotation data that may be stored within the image table 308 isso-called “lens” data. A “lens” may be a real-time special effect andsound that may be added to an image or a video.

As mentioned above, the video table 310 stores video data which, in oneembodiment, is associated with messages for which records are maintainedwithin the message table 314. Similarly, the image table 308 storesimage data associated with messages for which message data is stored inthe message table 314. The entity table 302 may associate variousannotations from the annotation table 312 with various images and videosstored in the image table 308 and the video table 310.

A story table 306 stores data regarding collections of messages andassociated image, video, or audio data, which are compiled into acollection (e.g., a story or a gallery). The creation of a particularcollection may be initiated by a particular user (e.g., each user forwhom a record is maintained in the entity table 302). A user may createa “personal story” in the form of a collection of content that has beencreated and sent/broadcast by that user. To this end, the user interfaceof the messaging client application 104 may include an icon that isuser-selectable to enable a sending user to add specific content to hisor her personal story.

A collection may also constitute a “live story,” which is a collectionof content from multiple users that is created manually, automatically,or using a combination of manual and automatic techniques. For example,a “live story” may constitute a curated stream of user-submitted contentfrom various locations and events. Users whose client devices 102 havelocation services enabled and are at a common location or event at aparticular time may, for example, be presented with an option, via auser interface of the messaging client application 104, to contributecontent to a particular live story. The live story may be identified tothe user by the messaging client application 104 based on his or herlocation. The end result is a “live story” told from a communityperspective.

A further type of content collection is known as a “location story,”which enables a user whose client device 102 is located within aspecific geographic location (e.g., on a college or university campus)to contribute to a particular collection. In some embodiments, acontribution to a location story may require a compact degree ofauthentication to verify that the end user belongs to a specificorganization or other entity (e.g., is a student on the universitycampus).

FIG. 4 is a schematic diagram illustrating a structure of a message 400,according to some embodiments, generated by a messaging clientapplication 104 for communication to a further messaging clientapplication 104 or the messaging server application 114. The content ofa particular message 400 is used to populate the message table 314stored within the database 120, accessible by the messaging serverapplication 114. Similarly, the content of a message 400 is stored inmemory as “in-transit” or “in-flight” data of the client device 102 orthe application server 112. The message 400 is shown to include thefollowing components:

-   -   A message identifier 402: a unique identifier that identifies        the message 400.    -   A message text payload 404: text, to be generated by a user via        a user interface of the client device 102 and that is included        in the message 400.    -   A message image payload 406: image data captured by a camera        component of a client device 102 or retrieved from memory of a        client device 102, and that is included in the message 400.    -   A message video payload 408: video data captured by a camera        component or retrieved from a memory component of the client        device 102, and that is included in the message 400.    -   A message audio payload 410: audio data captured by a microphone        or retrieved from the memory component of the client device 102,        and that is included in the message 400.    -   Message annotations 412: annotation data (e.g., filters,        stickers, or other enhancements) that represents annotations to        be applied to the message image payload 406, message video        payload 408, or message audio payload 410 of the message 400.    -   A message duration parameter 414: a parameter value indicating,        in compacts, the amount of time for which content of the message        400 (e.g., the message image payload 406, message video payload        408, and message audio payload 410) is to be presented or made        accessible to a user via the messaging client application 104.    -   A message geolocation parameter 416: geolocation data (e.g.,        latitudinal and longitudinal coordinates) associated with the        content payload of the message 400. Multiple message geolocation        parameter 416 values may be included in the payload, with each        of these parameter values being associated with respective        content items included in the content (e.g., a specific image in        the message image payload 406, or a specific video in the        message video payload 408).    -   A message story identifier 418: identifies values identifying        one or more content collections (e.g., “stories”) with which a        particular content item in the message image payload 406 of the        message 400 is associated. For example, multiple images within        the message image payload 406 may each be associated with        multiple content collections using identifier values.    -   A message tag 420: one or more tags, each of which is indicative        of the subject matter of content included in the message        payload. For example, where a particular image included in the        message image payload 406 depicts an animal (e.g., a lion), a        tag value may be included within the message tag 420 that is        indicative of the relevant animal. Tag values may be generated        manually, based on user input, or may be automatically generated        using, for example, image recognition.    -   A message sender identifier 422: an identifier (e.g., a        messaging system identifier, email address, or device        identifier) indicative of a user of the client device 102 on        which the message 400 was generated and from which the message        400 was sent.    -   A message receiver identifier 424: an identifier (e.g., a        messaging system identifier, email address, or device        identifier) indicative of a user of the client device 102 to        which the message 400 is addressed.

The contents (e.g., values) of the various components of the message 400may be pointers to locations in tables within which content data valuesare stored. For example, an image value in the message image payload 406may be a pointer to (or address of) a location within the image table308. Similarly, values within the message video payload 408 may point todata stored within the video table 310, values stored within the messageannotations 412 may point to data stored in the annotation table 312,values stored within the message story identifier 418 may point to datastored in the story table 306, and values stored within the messagesender identifier 422 and the message receiver identifier 424 may pointto user records stored within the entity table 302.

FIG. 5 is a schematic diagram illustrating an access-limiting process500, in terms of which access to content (e.g., an ephemeral message502, and associated multimedia payload of data) or a content collection(e.g., an ephemeral message story 504) may be time-limited (e.g., madeephemeral).

An ephemeral message 502 is shown to be associated with a messageduration parameter 506, the value of which determines an amount of timethat the ephemeral message 502 will be displayed to a receiving user ofthe ephemeral message 502 by the messaging client application 104. Inone embodiment, where the messaging client application 104 is anapplication client, an ephemeral message 502 is viewable by a receivinguser for up to a maximum of 10 compacts, depending on the amount of timethat the sending user specifies using the message duration parameter506.

The message duration parameter 506 and the message receiver identifier424 are shown to be inputs to a message timer 512, which is responsiblefor determining the amount of time that the ephemeral message 502 isshown to a particular receiving user identified by the message receiveridentifier 424. In particular, the ephemeral message 502 will only beshown to the relevant receiving user for a time period determined by thevalue of the message duration parameter 506. The message timer 512 isshown to provide output to a more generalized ephemeral timer system202, which is responsible for the overall timing of display of content(e.g., an ephemeral message 502) to a receiving user.

The ephemeral message 502 is shown in FIG. 5 to be included within anephemeral message story 504 (e.g., a personal story, or an event story).The ephemeral message story 504 has an associated story durationparameter 508, a value of which determines a time duration for which theephemeral message story 504 is presented and accessible to users of themessaging system 100. The story duration parameter 508, for example, maybe the duration of a music concert, where the ephemeral message story504 is a collection of content pertaining to that concert.Alternatively, a user (either the owning user or a curator user) mayspecify the value for the story duration parameter 508 when performingthe setup and creation of the ephemeral message story 504.

Additionally, each ephemeral message 502 within the ephemeral messagestory 504 has an associated story participation parameter 510, a valueof which determines the duration of time for which the ephemeral message502 will be accessible within the context of the ephemeral message story504. Accordingly, a particular ephemeral message 502 may “expire” andbecome inaccessible within the context of the ephemeral message story504, prior to the ephemeral message story 504 itself expiring in termsof the story duration parameter 508. The story duration parameter 508,story participation parameter 510, and message receiver identifier 424each provide input to a story timer 514, which operationally determineswhether a particular ephemeral message 502 of the ephemeral messagestory 504 will be displayed to a particular receiving user and, if so,for how long. Note that the ephemeral message story 504 is also aware ofthe identity of the particular receiving user as a result of the messagereceiver identifier 424.

Accordingly, the story timer 514 operationally controls the overalllifespan of an associated ephemeral message story 504, as well as anindividual ephemeral message 502 included in the ephemeral message story504. In one embodiment, each and every ephemeral message 502 within theephemeral message story 504 remains viewable and accessible for a timeperiod specified by the story duration parameter 508. In a furtherembodiment, a certain ephemeral message 502 may expire, within thecontext of the ephemeral message story 504, based on a storyparticipation parameter 510. Note that a message duration parameter 506may still determine the duration of time for which a particularephemeral message 502 is displayed to a receiving user, even within thecontext of the ephemeral message story 504. Accordingly, the messageduration parameter 506 determines the duration of time that a particularephemeral message 502 is displayed to a receiving user, regardless ofwhether the receiving user is viewing that ephemeral message 502 insideor outside the context of an ephemeral message story 504.

The ephemeral timer system 202 may furthermore operationally remove aparticular ephemeral message 502 from the ephemeral message story 504based on a determination that it has exceeded an associated storyparticipation parameter 510. For example, when a sending user hasestablished a story participation parameter 510 of 24 hours fromposting, the ephemeral timer system 202 will remove the relevantephemeral message 502 from the ephemeral message story 504 after thespecified 24 hours. The ephemeral timer system 202 also operates toremove an ephemeral message story 504 either when the storyparticipation parameter 510 for each and every ephemeral message 502within the ephemeral message story 504 has expired, or when theephemeral message story 504 itself has expired in terms of the storyduration parameter 508.

In certain use cases, a creator of a particular ephemeral message story504 may specify an indefinite story duration parameter 508. In thiscase, the expiration of the story participation parameter 510 for thelast remaining ephemeral message 502 within the ephemeral message story504 will determine when the ephemeral message story 504 itself expires.In this case, a new ephemeral message 502, added to the ephemeralmessage story 504, with a new story participation parameter 510,effectively extends the life of an ephemeral message story 504 to equalthe value of the story participation parameter 510.

In response to the ephemeral timer system 202 determining that anephemeral message story 504 has expired (e.g., is no longer accessible),the ephemeral timer system 202 communicates with the messaging system100 (e.g., specifically, the messaging client application 104) to causean indicium (e.g., an icon) associated with the relevant ephemeralmessage story 504 to no longer be displayed within a user interface ofthe messaging client application 104. Similarly, when the ephemeraltimer system 202 determines that the message duration parameter 506 fora particular ephemeral message 502 has expired, the ephemeral timersystem 202 causes the messaging client application 104 to no longerdisplay an indicium (e.g., an icon or textual identification) associatedwith the ephemeral message 502.

FIG. 6A shows internal functional engines of a generative distillationsystem 150, according to some example embodiments. As illustrated, thegenerative distillation system 150 comprises an interface engine 605, ateacher engine 610, a training engine 615, a student engine 620, and anactivation engine 625. The interface engine 605 is configured togenerate user interfaces and identify data for processing (e.g.,generating an image using an image sensor of the client device,identifying an existing image for processing, etc.). The teacher engine610 is configured to modify input data using a teacher generative neuralnetwork to generate output data. The training engine 615 managestraining a student generative neural network on the input data andoutput data from the teacher generative neural network. The activationengine 625 configures selecting a trained student generative neuralnetwork based on the type of processing to be performed.

FIG. 6B shows example internal engines of a client generativedistillation system 210, according to some example embodiments. Theclient generative distillation system 210 can include only engines thatapply trained student GNNs, thereby decreasing the footprint of theclient generative distillation system 210. For example, the clientgenerative distillation system 210 comprises the interface engine 605,student engine 620, and the activation engine 625. After a given studentgenerative neural network is trained using the training network 900(which can include a discriminative layer, and other data as discussedin further detail with reference to FIG. 9, below), the trained studentGNN is stored by itself, separate from the training network (i.e.,without the discriminative layer, etc.). The student engine 620 canstore a plurality of trained student GNNs, each trained to perform adifferent image task. When the interface engine 605 receives an inputand instruction to apply a generative neural network affect (e.g., aninstruction to apply image stylization), the activation engine 625 canselect one of the trained student GNNs, which the student engine 620 canthen apply to input data (e.g. an image).

FIG. 7 illustrates a flow diagram of a method 700 for implementingcompact generative neural networks, according to some exampleembodiments. At operation 705, the training engine 615 trains a teachergenerative neural network on an initial data set. For example, atoperation 705, the training engine 615 trains the teacher GNN using asmall set of images of real Monet paintings as training data.

At operation 707, the training engine 615 generates student trainingdata using the teacher GNN. For example, at operation 710, the trainingengine 615 applies the teacher GNN to a large set of input images (e.g.,landscape photos) to generate a large set of output images (e.g.,simulated Monet-style landscape photos). In some example embodiments,the teacher GNN is pre-trained and no teacher training occurs. In thoseexample embodiments, operation 705 is omitted and method 700 may startwith generating training data using the pre-trained teacher GNN.

At operation 710, the training engine 615 stores the input images andoutput images as student training data for the student GNN. At operation715, the training engine 615 trains a student generative neural networkusing a training network, as discussed in further detail below withreference to FIG. 9.

At operation 720, the interface engine 605 generates initial data forprocessing. For example, at operation 720, the interface engine 605generates an image using an image sensor of a client device 102.

At operation 725, the student engine 620 generates results data byapplying the trained student GNN on the initial data. For example, atoperation 725, the student generative engine 620 generates an image in asimulated Monet-style by applying the trained student GNN to the image.

At operation 730, the interface engine 605 displays the result datagenerated by the student generative neural network.

FIG. 8 shows example training data structure 800, according to someexample embodiments. The teacher training data 810 is an initial set oftraining data used to train the teacher neural network 805. Once theteacher neural network 805 is trained, a larger set of training data canbe generated. For example, a large set of input data 815 (e.g., a largeset of landscape photos) can be input into the teacher neural network805 to yield a large set of output data 820 (e.g., the simulatedMonet-style landscape photos). The input data 815 and the output data820 are stored as student training data 825 for use in training thestudent neural network 830, as discussed in further detail in FIG. 9.

FIG. 9 shows a generative training network 900, according to someexample embodiments. In the example of FIG. 9, only a single image “I”is discussed, however it is appreciated that the training network 900can utilize a large set of training data (e.g., the multiple input andoutput images in student training data 825) to train the student neuralnetwork. In some example embodiments, the student neural network 910 isa convolutional neural network configured to receive an input image 905and generate an output image 915. The discriminator 925 is configured toevaluate the output image 915 against a target image 920, which is anoutput image generated by inputting input image 905 into the pre-trainedteacher GNN. That is, in other words, the input image 905 may be one ofthe input images in input data 815 (FIG. 8), and the target image 920may be one of the output images in output data 820 (generated by teacherneural network 805 in FIG. 8). Continuing, in some example embodiments,the discriminator 925 generates a classification output 930 thatindicates whether the output image 915 satisfactory simulates the targetimage 920. The entire training network 900 is trained in an end-to-endmanner as a single network. In some example embodiments, after thestudent neural network 910 is trained only the trained student neuralnetwork 910 is distributed to client devices 102, as discussed abovewith reference to FIG. 6B.

In some example embodiments, the training network 900 trains the studentneural network using one or more of the following losses:

Perception Loss:

$L_{p} = {\sum\limits_{l \in L}\;{{{P_{l}\left( \hat{I} \right)} - {P_{l}\left( I^{*} \right)}}}_{2}}$

Task Specific Adversarial Loss:L _(adv) =E[log(1−D(G(I)))]

Task Specific Teeth Loss:L _(t) =∥S _(v)(M⊙Î)−S _(v)(M⊙I*)∥₂

Task Specific High-Frequency Loss:L _(hf)=∥LoG(Î)−LoG(I*)∥₂where I, Î, I* are input, output, and target images, respectively;P_(l)(⋅) is the l-th layer of the pre-trained network, such as VGG-19(Visual Geometry Group—19); G(⋅) is the student network, D(⋅) is thediscriminator network, S_(v) is the differential vertical Sobeloperator, ⊙ is element-wise matrix multiplication, M is a mouth regionmask, and LoG is the differential Laplacian of Gaussian operator. Whichlosses are used by the student neural network in the training networkcan depend what type of image processing the student network is toperform, as discussed below with reference to FIG. 10.

FIG. 10 shows a flow diagram of a method 1000 for selection of a studentgenerative neural network to perform processing, according to someexample embodiments. Monet-style image transfers have been discussedabove, but it is appreciated that other types of generative processingcan be implemented using the compact student GNN training approach. Insome example embodiments, which of the above losses are used in trainingdepends on the type of generative processing to be performed. In someexample embodiments, the training network 900 applies perception lossand task specific adversarial loss in the training of all student neuralnetworks. In some example embodiments, additional losses are included intraining to yield higher quality task-specific processing. For example,if the image to be processed depicts teeth, then the task specific teethloss is included in the training network along with perception loss andthe task specific loss. Further, if the image to be processed isconsidered a high-frequency image (e.g., a person smiling with smilewrinkles), then the task specific high-frequency loss can be included inthe training network along with perception loss and task specific loss.High-frequency refers to the rate of pixel value changes in a givenimage: e.g., an image with lots of edges, wrinkles, corners would be ahigh-frequency image and an image featuring a uniform solid color withfew features would be an example of a low-frequency image. In someexample embodiments, multiple student GNNs are trained, where eachtrained student GNN configured to produce a certain image effect. Forexample, a first student GNN may be configured to apply a Monet-styletransfer effect, a second student GNN may be configured to apply and“old” effect, whereby an image of a user is modified to make the personappear older (e.g., add wrinkles, etc.), a third student GNN may beapplied to make the person appear younger (e.g., soften the face, removewrinkles, enlarge eyes), and so on. Each of the student GNNs can betrained from a full-size teacher GNN (e.g., VGG-19) using the trainingnetwork 900. FIG. 10 illustrates a method 1000 for selecting a studentGNN based on the type of image manipulation to be performed.

At operation 1005, the activation engine 625 stores a plurality ofstudent neural networks. Each of the student neural networks may betrained to apply different image effects using the training network 900discussed above. At operation 1010, the interface engine 605 generatesan image using an image sensor of the client device 102. For example,with reference to FIG. 11, a user 1100 uses a camera 1103 of clientdevice 102 to generate an image 1105 of the user (e.g., a “selfie”),which can then be displayed on a user interface 1110.

At operation 1015, the interface engine 605 receives a modificationinstruction. For example, at operation 1015, the interface engine 605receives a selection of one of the plurality of user interface buttons1115. Each of the buttons 1115 can be configured to apply a differentimage effect. For example, the “B1” button can apply a Monet-style imagetransfer using a first GNN trained with the adversarial and perceptionloss, the “B2” button can be configured to apply an “old” image styletransfer effect using adversarial loss, perception loss, andhigh-frequency loss trained student GNN, and so on.

At operation 1020, the activation engine 625 activates one of thestudent neural networks associated with the modification instructionreceived at operation 1015. For example, assuming the user 1100 selects“B1”, a student GNN associated with the “B1” button is activated.

At operation 1025, the generative student engine 620 generates amodified image using the activated student neural network. For example,the activated student GNN associated with the “B1” button is applied toimage 1105 to generate a modified image.

FIG. 11 shows a flow diagram of a method 1200 for selection of a studentneural network based on detected features, according to some exampleembodiments. As discussed, which losses are applied can be selectedbefore-hand, based on the type of processing to be performed. In someexample embodiments, initial analysis is performed to determine if theinput image may benefit from additional losses. The method 1200 shows amethod of selecting different student GNNs based on image features of agiven image.

At operation 1205, the interface engine 605 generates an image using animage sensor of the client device. For example, with reference to FIG.13A, a user 1300 selects button 1315 to generate an image 1305 using acamera 1303 of client device 102, which is then displayed on userinterface 1307.

At operation 1210, the interface engine 605 receives a modificationinstruction. For example, the user 1300 screen taps the modify button1310 which activates a student GNN trained to apply a young image-styleeffect in which wrinkles are removed, etc. At operation 1215, theactivation engine 625 generates feature data that describescharacteristics of the image. For example, at operation 1215, theactivation engine 625 performs feature detection analysis on the image1305 to determine that the image depicts teeth.

At operation 1220, the activation engine 625 determines whether thefeature data generated at operation 1215 satisfies a threshold (e.g.,whether the image depicts a pre-specified feature such as teeth, or is ahigh-frequency image with multiple edges). If the feature data does notsatisfy the threshold, then the method continues to operation 1225 inwhich a default student neural network is applied to the image.Alternatively, if the feature data does satisfy the threshold, themethod continues to operation 1230 in which a different student neuralnetwork (e.g., a student neural network trained with a different set oflosses) is applied to the image. The resulting image is then stored bythe student engine 620 at operation 1235.

For example, with reference to FIG. 13A, the button 1310 can beconfigured to apply a “young” image effect by smoothing skin texture andremoving wrinkles. The young image effect can be applied using a defaultstudent GNN trained with adversarial loss, perception loss, andhigh-frequency loss. In some example embodiments, responsive toselecting button 1310, the activation engine 625 determines that theimage depicts teeth using a teeth object recognition neural network.Responsive to detecting the teeth, a different student GNN that istrained with the default losses (e.g., perception, adversarial, andhigh-frequency) and an additional loss (e.g., task specific teeth loss)to yield a higher quality modified image. FIG. 13B shows an exampleoutput image 1350 generated by the student GNN applied at operation1130.

FIG. 14 is a block diagram illustrating an example of a softwarearchitecture that may be installed on a machine, according to someexample embodiments. FIG. 14 is merely a non-limiting example of asoftware architecture, and it will be appreciated that many otherarchitectures may be implemented to facilitate the functionalitydescribed herein. The software architecture 1402 may be executing onhardware such as a machine 1500 of FIG. 15 that includes, among otherthings, processors 1510, memory 1530, and I/O components 1550. Arepresentative hardware layer 1404 is illustrated and can represent, forexample, the machine 1500 of FIG. 15. The representative hardware layer1404 comprises one or more processing units 1406 having associatedexecutable instructions 1408. The executable instructions 1408 representthe executable instructions of the software architecture 1402, includingimplementation of the methods, modules, and so forth discussed above.The hardware layer 1404 also includes memory or storage modules 1410,which also have the executable instructions 1408. The hardware layer1404 may also comprise other hardware 1412, which represents any otherhardware of the hardware layer 1404, such as the other hardwareillustrated as part of the machine 1400.

In the example architecture of FIG. 14, the software architecture 1402may be conceptualized as a stack of layers, where each layer providesparticular functionality. For example, the software architecture 1402may include layers such as an operating system 1414, libraries 1416,frameworks/middleware 1418, applications 1420, and a presentation layer1444. Operationally, the applications 1420 or other components withinthe layers may invoke API calls 1424 through the software stack andreceive a response, returned values, and so forth (illustrated asmessages 1426) in response to the API calls 1424. The layers illustratedare representative in nature, and not all software architectures haveall layers. For example, some mobile or special purpose operatingsystems may not provide a frameworks/middleware 1418 layer, while othersmay provide such a layer. Other software architectures may includeadditional or different layers.

The operating system 1414 may manage hardware resources and providecommon services. The operating system 1414 may include, for example, akernel 1428, services 1430, and drivers 1432. The kernel 1428 may act asan abstraction layer between the hardware and the other software layers.For example, the kernel 1428 may be responsible for memory management,processor management (e.g., scheduling), component management,networking, security settings, and so on. The services 1430 may provideother common services for the other software layers. The drivers 1432may be responsible for controlling or interfacing with the underlyinghardware. For instance, the drivers 1432 may include display drivers,camera drivers, Bluetooth® drivers, flash memory drivers, serialcommunication drivers (e.g., Universal Serial Bus (USB) drivers), Wi-Fi®drivers, audio drivers, power management drivers, and so forth dependingon the hardware configuration.

The libraries 1416 may provide a common infrastructure that may beutilized by the applications 1420 and/or other components and/or layers.The libraries 1416 typically provide functionality that allows othersoftware modules to perform tasks in an easier fashion than byinterfacing directly with the underlying operating system 1414functionality (e.g., kernel 1428, services 1430, or drivers 1432). Thelibraries 1416 may include system libraries 1434 (e.g., C standardlibrary) that may provide functions such as memory allocation functions,string manipulation functions, mathematic functions, and the like. Inaddition, the libraries 1416 may include API libraries 1436 such asmedia libraries (e.g., libraries to support presentation andmanipulation of various media formats such as MPEG4, H.264, MP3, AAC,AMR, JPG, PNG), graphics libraries (e.g., an OpenGL framework that maybe used to render 2D and 3D graphic content on a display), databaselibraries (e.g., SQLite that may provide various relational databasefunctions), web libraries (e.g., WebKit that may provide web browsingfunctionality), and the like. The libraries 1416 may also include a widevariety of other libraries 1438 to provide many other APIs to theapplications 1420 and other software components/modules.

The frameworks 1418 (also sometimes referred to as middleware) mayprovide a higher-level common infrastructure that may be utilized by theapplications 1420 or other software components/modules. For example, theframeworks 1418 may provide various graphic user interface (GUI)functions, high-level resource management, high-level location services,and so forth. The frameworks 1418 may provide a broad spectrum of otherAPIs that may be utilized by the applications 1420 and/or other softwarecomponents/modules, some of which may be specific to a particularoperating system or platform.

The applications 1420 include built-in applications 1440 and/orthird-party applications 1442. Examples of representative built-inapplications 1440 may include, but are not limited to, a homeapplication, a contacts application, a browser application, a bookreader application, a location application, a media application, amessaging application, or a game application.

The third-party applications 1442 may include any of the built-inapplications 1440, as well as a broad assortment of other applications.In a specific example, the third-party applications 1442 (e.g., anapplication developed using the Android™ or iOS™ software developmentkit (SDK) by an entity other than the vendor of the particular platform)may be mobile software running on a mobile operating system such asiOS™, Android™, Windows® Phone, or other mobile operating systems. Inthis example, the third-party applications 1442 may invoke the API calls1424 provided by the mobile operating system such as the operatingsystem 1414 to facilitate functionality described herein.

The applications 1420 may utilize built-in operating system functions(e.g., kernel 1428, services 1430, or drivers 1432), libraries (e.g.,system libraries 1434, APIs 1436, and other libraries 1438), orframeworks/middleware 1418 to create user interfaces to interact withusers of the system. Alternatively, or additionally, in some systems,interactions with a user may occur through a presentation layer, such asthe presentation layer 1444. In these systems, the application/module“logic” can be separated from the aspects of the application/module thatinteract with the user.

Some software architectures utilize virtual machines. In the example ofFIG. 14, this is illustrated by a virtual machine 1448. A virtualmachine creates a software environment where applications/modules canexecute as if they were executing on a hardware machine e.g., themachine 1500 of FIG. 15, for example). A virtual machine 1448 is hostedby a host operating system (e.g., operating system 1414) and typically,although not always, has a virtual machine monitor 1446, which managesthe operation of the virtual machine 1448 as well as the interface withthe host operating system (e.g., operating system 1414). A softwarearchitecture executes within the virtual machine 1448, such as anoperating system 1450, libraries 1452, frameworks/middleware 1454,applications 1456, or a presentation layer 1458. These layers ofsoftware architecture executing within the virtual machine 1448 can bethe same as corresponding layers previously described or may bedifferent.

FIG. 15 illustrates a diagrammatic representation of a machine 1500 inthe form of a computer system within which a set of instructions may beexecuted for causing the machine to perform any one or more of themethodologies discussed herein, according to an example embodiment.Specifically, FIG. 15 shows a diagrammatic representation of the machine1500 in the example form of a computer system, within which instructions1516 (e.g., software, a program, an application, an applet, an app, orother executable code) for causing the machine 1500 to perform any oneor more of the methodologies discussed herein may be executed. Forexample the instructions 1516 may cause the machine 1500 to execute themethods discussed above. Additionally, or alternatively, theinstructions 1516 may implement the methods discussed above. Theinstructions 1516 transform the general, non-programmed machine 1500into a particular machine 1500 programmed to carry out the described andillustrated functions in the manner described. In alternativeembodiments, the machine 1500 operates as a standalone device or may becoupled (e.g., networked) to other machines. In a networked deployment,the machine 1500 may operate in the capacity of a server machine or aclient machine in a server-client network environment, or as a peermachine in a peer-to-peer (or distributed) network environment. Themachine 1500 may comprise, but not be limited to, a server computer, aclient computer, a personal computer (PC), a tablet computer, a laptopcomputer, a netbook, a set-top box (STB), a PDA, an entertainment mediasystem, a cellular telephone, a smart phone, a mobile device, a wearabledevice (e.g., a smart watch), a smart home device (e.g., a smartappliance), other smart devices, a web appliance, a network router, anetwork switch, a network bridge, or any machine capable of executingthe instructions 1516, sequentially or otherwise, that specify actionsto be taken by the machine 1500. Further, while only a single machine1500 is illustrated, the term “machine” shall also be taken to include acollection of machines 1500 that individually or jointly execute theinstructions 1516 to perform any one or more of the methodologiesdiscussed herein.

The machine 1500 may include processors 1510, memory 1530, and I/Ocomponents 1550, which may be configured to communicate with each othersuch as via a bus 1502. In an example embodiment, the processors 1510(e.g., a Central Processing Unit (CPU), a Reduced Instruction SetComputing (RISC) processor, a Complex Instruction Set Computing (CISC)processor, a Graphics Processing Unit (GPU), a Digital Signal Processor(DSP), an ASIC, a Radio-Frequency Integrated Circuit (RFIC), anotherprocessor, or any suitable combination thereof) may include, forexample, a processor 1512 and a processor 1514 that may execute theinstructions 1516. The term “processor” is intended to includemulti-core processors that may comprise two or more independentprocessors (sometimes referred to as “cores”) that may executeinstructions contemporaneously. Although FIG. 15 shows multipleprocessors 1510, the machine 1500 may include a single processor with asingle core, a single processor with multiple cores (e.g., a multi-coreprocessor), multiple processors with a single core, multiple processorswith multiples cores, or any combination thereof.

The memory 1530 may include a main memory 1532, a static memory 1534,and a storage unit 1536, both accessible to the processors 1510 such asvia the bus 1502. The main memory 1530, the static memory 1534, andstorage unit 1536 store the instructions 1516 embodying any one or moreof the methodologies or functions described herein. The instructions1516 may also reside, completely or partially, within the main memory1532, within the static memory 1534, within the storage unit 1536,within at least one of the processors 1510 (e.g., within the processor'scache memory), or any suitable combination thereof, during executionthereof by the machine 1500.

The I/O components 1550 may include a wide variety of components toreceive input, provide output, produce output, transmit information,exchange information, capture measurements, and so on. The specific I/Ocomponents 1550 that are included in a particular machine will depend onthe type of machine. For example, portable machines such as mobilephones will likely include a touch input device or other such inputmechanisms, while a headless server machine will likely not include sucha touch input device. It will be appreciated that the I/O components1550 may include many other components that are not shown in FIG. 15.The I/O components 1550 are grouped according to functionality merelyfor simplifying the following discussion and the grouping is in no waylimiting. In various example embodiments, the I/O components 1550 mayinclude output components 1552 and input components 1554. The outputcomponents 1552 may include visual components (e.g., a display such as aplasma display panel (PDP), a light emitting diode (LED) display, aliquid crystal display (LCD), a projector, or a cathode ray tube (CRT)),acoustic components (e.g., speakers), haptic components (e.g., avibratory motor, resistance mechanisms), other signal generators, and soforth. The input components 1554 may include alphanumeric inputcomponents (e.g., a keyboard, a touch screen configured to receivealphanumeric input, a photo-optical keyboard, or other alphanumericinput components), point-based input components (e.g., a mouse, atouchpad, a trackball, a joystick, a motion sensor, or another pointinginstrument), tactile input components (e.g., a physical button, a touchscreen that provides location and/or force of touches or touch gestures,or other tactile input components), audio input components (e.g., amicrophone), and the like.

In further example embodiments, the I/O components 1550 may includebiometric components 1556, motion components 1558, environmentalcomponents 1560, or position components 1562, among a wide array ofother components. For example, the biometric components 1556 may includecomponents to detect expressions (e.g., hand expressions, facialexpressions, vocal expressions, body gestures, or eye tracking), measurebiosignals (e.g., blood pressure, heart rate, body temperature,perspiration, or brain waves), identify a person (e.g., voiceidentification, retinal identification, facial identification,fingerprint identification, or electroencephalogram-basedidentification), and the like. The motion components 1558 may includeacceleration sensor components (e.g., accelerometer), gravitation sensorcomponents, rotation sensor components (e.g., gyroscope), and so forth.The environmental components 1560 may include, for example, illuminationsensor components (e.g., photometer), temperature sensor components(e.g., one or more thermometers that detect ambient temperature),humidity sensor components, pressure sensor components (e.g.,barometer), acoustic sensor components (e.g., one or more microphonesthat detect background noise), proximity sensor components (e.g.,infrared sensors that detect nearby objects), gas sensors (e.g., gasdetection sensors to detection concentrations of hazardous gases forsafety or to measure pollutants in the atmosphere), or other componentsthat may provide indications, measurements, or signals corresponding toa surrounding physical environment. The position components 1562 mayinclude location sensor components (e.g., a GPS receiver component),altitude sensor components (e.g., altimeters or barometers that detectair pressure from which altitude may be derived), orientation sensorcomponents (e.g., magnetometers), and the like.

Communication may be implemented using a wide variety of technologies.The I/O components 1550 may include communication components 1564operable to couple the machine 1500 to a network 1580 or devices 1570via a coupling 1582 and a coupling 1572, respectively. For example, thecommunication components 1564 may include a network interface componentor another suitable device to interface with the network 1580. Infurther examples, the communication components 1564 may include wiredcommunication components, wireless communication components, cellularcommunication components, Near Field Communication (NFC) components,Bluetooth® components (e.g., Bluetooth® Low Energy), Wi-Fi® components,and other communication components to provide communication via othermodalities. The devices 1570 may be another machine or any of a widevariety of peripheral devices (e.g., a peripheral device coupled via aUSB).

Moreover, the communication components 1564 may detect identifiers orinclude components operable to detect identifiers. For example, thecommunication components 1564 may include Radio Frequency Identification(RFID) tag reader components, NFC smart tag detection components,optical reader components (e.g., an optical sensor to detectone-dimensional bar codes such as Universal Product Code (UPC) bar code,multi-dimensional bar codes such as Quick Response (QR) code, Azteccode, Data Matrix, Dataglyph, MaxiCode, PDF417, Ultra Code, UCC RSS-2Dbar code, and other optical codes), or acoustic detection components(e.g., microphones to identify tagged audio signals). In addition, avariety of information may be derived via the communication components1564, such as location via Internet Protocol (IP) geolocation, locationvia Wi-Fi® signal triangulation, location via detecting an NFC beaconsignal that may indicate a particular location, and so forth.

Executable Instructions and Machine Storage Medium

The various memories (i.e., 1530, 1532, 1534, and/or memory of theprocessor(s) 1510) and/or storage unit 1536 may store one or more setsof instructions and data structures (e.g., software) embodying orutilized by any one or more of the methodologies or functions describedherein. These instructions (e.g., the instructions 1516), when executedby processor(s) 1510, cause various operations to implement thedisclosed embodiments.

As used herein, the terms “machine-storage medium,” “device-storagemedium,” “computer-storage medium” mean the same thing and may be usedinterchangeably in this disclosure. The terms refer to a single ormultiple storage devices and/or media (e.g., a centralized ordistributed database, and/or associated caches and servers) that storeexecutable instructions and/or data. The terms shall accordingly betaken to include, but not be limited to, solid-state memories, andoptical and magnetic media, including memory internal or external toprocessors. Specific examples of machine-storage media, computer-storagemedia and/or device-storage media include non-volatile memory, includingby way of example semiconductor memory devices, e.g., erasableprogrammable read-only memory (EPROM), electrically erasableprogrammable read-only memory (EEPROM), FPGA, and flash memory devices;magnetic disks such as internal hard disks and removable disks;magneto-optical disks; and CD-ROM and DVD-ROM disks. The terms“machine-storage media,” “computer-storage media,” and “device-storagemedia” specifically exclude carrier waves, modulated data signals, andother such media, at least some of which are covered under the term“signal medium” discussed below.

Transmission Medium

In various example embodiments, one or more portions of the network 1580may be an ad hoc network, an intranet, an extranet, a VPN, a LAN, aWLAN, a WAN, a WWAN, a MAN, the Internet, a portion of the Internet, aportion of the PSTN, a plain old telephone service (POTS) network, acellular telephone network, a wireless network, a Wi-Fi® network,another type of network, or a combination of two or more such networks.For example, the network 1580 or a portion of the network 1580 mayinclude a wireless or cellular network, and the coupling 1582 may be aCode Division Multiple Access (CDMA) connection, a Global System forMobile communications (GSM) connection, or another type of cellular orwireless coupling. In this example, the coupling 1582 may implement anyof a variety of types of data transfer technology, such as SingleCarrier Radio Transmission Technology (1×RTT), Evolution-Data Optimized(EVDO) technology, General Packet Radio Service (GPRS) technology,Enhanced Data rates for GSM Evolution (EDGE) technology, thirdGeneration Partnership Project (3GPP) including 3G, fourth generationwireless (4G) networks, Universal Mobile Telecommunications System(UMTS), High Speed Packet Access (HSPA), Worldwide Interoperability forMicrowave Access (WiMAX), Long Term Evolution (LTE) standard, othersdefined by various standard-setting organizations, other long rangeprotocols, or other data transfer technology.

The instructions 1516 may be transmitted or received over the network1580 using a transmission medium via a network interface device (e.g., anetwork interface component included in the communication components1564) and utilizing any one of a number of well-known transfer protocols(e.g., hypertext transfer protocol (HTTP)). Similarly, the instructions1516 may be transmitted or received using a transmission medium via thecoupling 1572 (e.g., a peer-to-peer coupling) to the devices 1570. Theterms “transmission medium” and “signal medium” mean the same thing andmay be used interchangeably in this disclosure. The terms “transmissionmedium” and “signal medium” shall be taken to include any intangiblemedium that is capable of storing, encoding, or carrying theinstructions 1516 for execution by the machine 1500, and includesdigital or analog communications signals or other intangible media tofacilitate communication of such software. Hence, the terms“transmission medium” and “signal medium” shall be taken to include anyform of modulated data signal, carrier wave, and so forth. The term“modulated data signal” means a signal that has one or more of itscharacteristics set or changed in such a matter as to encode informationin the signal.

Glossary

“CARRIER SIGNAL” in this context refers to any intangible medium that iscapable of storing, encoding, or carrying instructions 1516 forexecution by the machine 1500, and includes digital or analogcommunications signals or other intangible media to facilitatecommunication of such instructions 1516. Instructions 1516 may betransmitted or received over the network 1580 using a transmissionmedium via a network interface device and using any one of a number ofwell-known transfer protocols.

“CLIENT DEVICE” in this context refers to any machine 1500 thatinterfaces to a communications network 1580 to obtain resources from oneor more server systems or other client devices 102. A client device 102may be, but is not limited to, a mobile phone, desktop computer, laptop,PDA, smartphone, tablet, ultrabook, netbook, multi-processor system,microprocessor-based or programmable consumer electronics system, gameconsole, set-top box, or any other communication device that a user mayuse to access a network 1580.

“COMMUNICATIONS NETWORK” in this context refers to one or more portionsof a network 1580 that may be an ad hoc network, an intranet, anextranet, a virtual private network (VPN), a local area network (LAN), awireless LAN (WLAN), a wide area network (WAN), a wireless WAN (WWAN), ametropolitan area network (MAN), the Internet, a portion of theInternet, a portion of the Public Switched Telephone Network (PSTN), aplain old telephone service (POTS) network, a cellular telephonenetwork, a wireless network, a Wi-Fi® network, another type of network,or a combination of two or more such networks. For example, a network ora portion of a network 1580 may include a wireless or cellular networkand the coupling may be a Code Division Multiple Access (CDMA)connection, a Global System for Mobile communications (GSM) connection,or another type of cellular or wireless coupling. In this example, thecoupling may implement any of a variety of types of data transfertechnology, such as Single Carrier Radio Transmission Technology(1×RTT), Evolution-Data Optimized (EVDO) technology, General PacketRadio Service (GPRS) technology, Enhanced Data rates for GSM Evolution(EDGE) technology, third Generation Partnership Project (3GPP) including3G, fourth generation wireless (4G) networks, Universal MobileTelecommunications System (UMTS), High-Speed Packet Access (HSPA),Worldwide Interoperability for Microwave Access (WiMAX), Long-TermEvolution (LTE) standard, others defined by various standard-settingorganizations, other long-range protocols, or other data transfertechnology.

“EMPHEMERAL MESSAGE” in this context refers to a message 400 that isaccessible for a time-limited duration. An ephemeral message 502 may bea text, an image, a video, and the like. The access time for theephemeral message 502 may be set by the message sender. Alternatively,the access time may be a default setting or a setting specified by therecipient. Regardless of the setting technique, the message 400 istransitory.

“MACHINE-READABLE MEDIUM” in this context refers to a component, adevice, or other tangible media able to store instructions 1516 and datatemporarily or permanently and may include, but is not limited to,random-access memory (RAM), read-only memory (ROM), buffer memory, flashmemory, optical media, magnetic media, cache memory, other types ofstorage (e.g., erasable programmable read-only memory (EPROM)), and/orany suitable combination thereof. The term “machine-readable medium”should be taken to include a single medium or multiple media (e.g., acentralized or distributed database, or associated caches and servers)able to store instructions 1516. The term “machine-readable medium”shall also be taken to include any medium, or combination of multiplemedia, that is capable of storing instructions 1516 (e.g., code) forexecution by a machine 1500, such that the instructions 1516, whenexecuted by one or more processors 1510 of the machine 1500, cause themachine 1500 to perform any one or more of the methodologies describedherein. Accordingly, a “machine-readable medium” refers to a singlestorage apparatus or device, as well as “cloud-based” storage systems orstorage networks that include multiple storage apparatus or devices. Theterm “machine-readable medium” excludes signals per se.

“COMPONENT” in this context refers to a device, a physical entity, orlogic having boundaries defined by function or subroutine calls, branchpoints, APIs, or other technologies that provide for the partitioning ormodularization of particular processing or control functions. Componentsmay be combined via their interfaces with other components to carry outa machine process. A component may be a packaged functional hardwareunit designed for use with other components and a part of a program thatusually performs a particular function of related functions. Componentsmay constitute either software components (e.g., code embodied on amachine-readable medium) or hardware components. A “hardware component”is a tangible unit capable of performing certain operations and may beconfigured or arranged in a certain physical manner. In various exampleembodiments, one or more computer systems (e.g., a standalone computersystem, a client computer system, or a server computer system) or one ormore hardware components of a computer system (e.g., a processor 1512 ora group of processors 1510) may be configured by software (e.g., anapplication or application portion) as a hardware component thatoperates to perform certain operations as described herein. A hardwarecomponent may also be implemented mechanically, electronically, or anysuitable combination thereof. For example, a hardware component mayinclude dedicated circuitry or logic that is permanently configured toperform certain operations. A hardware component may be aspecial-purpose processor, such as a field-programmable gate array(FPGA) or an application-specific integrated circuit (ASIC). A hardwarecomponent may also include programmable logic or circuitry that istemporarily configured by software to perform certain operations. Forexample, a hardware component may include software executed by ageneral-purpose processor or other programmable processor. Onceconfigured by such software, hardware components become specificmachines (or specific components of a machine 1500) uniquely tailored toperform the configured functions and are no longer general-purposeprocessors 1510. It will be appreciated that the decision to implement ahardware component mechanically, in dedicated and permanently configuredcircuitry, or in temporarily configured circuitry (e.g., configured bysoftware) may be driven by cost and time considerations. Accordingly,the phrase “hardware component” (or “hardware-implemented component”)should be understood to encompass a tangible entity, be that an entitythat is physically constructed, permanently configured (e.g.,hardwired), or temporarily configured (e.g., programmed) to operate in acertain manner or to perform certain operations described herein.

Considering embodiments in which hardware components are temporarilyconfigured (e.g., programmed), each of the hardware components need notbe configured or instantiated at any one instance in time. For example,where a hardware component comprises a general-purpose processor 1512configured by software to become a special-purpose processor, thegeneral-purpose processor 1512 may be configured as respectivelydifferent special-purpose processors (e.g., comprising differenthardware components) at different times. Software accordingly configuresa particular processor 1512 or processors 1510, for example, toconstitute a particular hardware component at one instance of time andto constitute a different hardware component at a different instance oftime.

Hardware components can provide information to, and receive informationfrom, other hardware components. Accordingly, the described hardwarecomponents may be regarded as being communicatively coupled. Wheremultiple hardware components exist contemporaneously, communications maybe achieved through signal transmission (e.g., over appropriate circuitsand buses) between or among two or more of the hardware components. Inembodiments in which multiple hardware components are configured orinstantiated at different times, communications between or among suchhardware components may be achieved, for example, through the storageand retrieval of information in memory structures to which the multiplehardware components have access. For example, one hardware component mayperform an operation and store the output of that operation in a memorydevice to which it is communicatively coupled. A further hardwarecomponent may then, at a later time, access the memory device toretrieve and process the stored output. Hardware components may alsoinitiate communications with input or output devices, and can operate ona resource (e.g., a collection of information).

The various operations of example methods described herein may beperformed, at least partially, by one or more processors 1510 that aretemporarily configured (e.g., by software) or permanently configured toperform the relevant operations. Whether temporarily or permanentlyconfigured, such processors 1510 may constitute processor-implementedcomponents that operate to perform one or more operations or functionsdescribed herein. As used herein, “processor-implemented component”refers to a hardware component implemented using one or more processors1510. Similarly, the methods described herein may be at least partiallyprocessor-implemented, with a particular processor 1512 or processors1510 being an example of hardware. For example, at least some of theoperations of a method may be performed by one or more processors 1510or processor-implemented components. Moreover, the one or moreprocessors 1510 may also operate to support performance of the relevantoperations in a “cloud computing” environment or as a “software as aservice” (SaaS). For example, at least some of the operations may beperformed by a group of computers (as examples of machines 1500including processors 1510), with these operations being accessible via anetwork 1580 (e.g., the Internet) and via one or more appropriateinterfaces (e.g., an API). The performance of certain of the operationsmay be distributed among the processors 1510, not only residing within asingle machine 1500, but deployed across a number of machines 1500. Insome example embodiments, the processors 1510 or processor-implementedcomponents may be located in a single geographic location (e.g., withina home environment, an office environment, or a server farm). In otherexample embodiments, the processors 1510 or processor-implementedcomponents may be distributed across a number of geographic locations.

“PROCESSOR” in this context refers to any circuit or virtual circuit (aphysical circuit emulated by logic executing on an actual processor1512) that manipulates data values according to control signals (e.g.,“commands,” “op codes,” “machine code,” etc.) and which producescorresponding output signals that are applied to operate a machine 1500.A processor may, for example, be a central processing unit (CPU), areduced instruction set computing (RISC) processor, a complexinstruction set computing (CISC) processor, a graphics processing unit(GPU), a digital signal processor (DSP), an ASIC, a radio-frequencyintegrated circuit (RFIC), or any combination thereof. A processor 1510may further be a multi-core processor 1510 having two or moreindependent processors 1512, 1514 (sometimes referred to as “cores”)that may execute instructions 1516 contemporaneously.

“TIMESTAMP” in this context refers to a sequence of characters orencoded information identifying when a certain event occurred, forexample giving date and time of day, sometimes accurate to a smallfraction of a compact.

What is claimed is:
 1. A method comprising: identifying input data andoutput data of a teacher generative neural network, the output datagenerated by modifying the input data using the teacher generativeneural network, wherein the input data comprises a plurality of objects;training a plurality of student generative neural networks on the inputdata and the output data generated by the teacher generative neuralnetwork using adversarial loss, wherein a student generative neuralnetwork is trained for each object of the plurality of objects;receiving initial data on a user device; identifying, using imageprocessing, an object in the initial data; selecting a studentgenerative neural network trained for the identified object; andgenerating, on the user device, result data by modifying the initialdata using the selected student generative neural network.
 2. The methodof claim 1, wherein the plurality of student generative neural networksare trained using a discriminative neural network that evaluates dataoutput by the student generative neural network compared with targetdata.
 3. The method of claim 2, wherein the target data is theidentified output data of the teacher generative neural network.
 4. Themethod of claim 2, wherein the student generative neural network istrained using a classification layer that receives input data from thediscriminative neural network.
 5. The method of claim 2, wherein theplurality of student generative neural networks and the discriminativeneural network are trained end-to-end.
 6. The method of claim 1, whereinthe plurality of student generative neural networks are trained usingtask specific loss.
 7. The method of claim 1, wherein the plurality ofstudent generative neural networks are trained using high frequencyloss.
 8. The method of claim 1, further comprising: receiving, on theuser device, an instruction to alter the initial data using amodification specified in the instruction, wherein the modificationcorresponds to an object of the plurality of objects.
 9. The method ofclaim 8, further comprising: selecting, from the plurality of studentgenerative neural networks stored on the user device, the studentgenerative neural network trained for the object.
 10. The method ofclaim 1, wherein each of the plurality of student generative neuralnetworks applies adversarial loss.
 11. The method of claim 10, whereinone or more of the plurality of generative student neural networksapplies one or more additional losses.
 12. The method of claim 11,wherein the one or more additional losses includes one or more of:perception loss, high frequency loss, and task specific loss.
 13. Themethod of claim 1, wherein the initial data is an image and the resultdata is a modified image.
 14. The method of claim 1, wherein a studentmodel sized of the trained student generative neural networks is atleast twice as small as a teacher model size of the trained teachergenerative neural network.
 15. A system comprising: one or moreprocessors of a machine; and a memory storing instructions that, whenexecuted by the one or more processors, cause the machine to performoperations comprising: identifying input data and output data of ateacher generative neural network, the output data generated bymodifying the input data using the teacher generative neural network,wherein the input data comprises a plurality of objects; training aplurality of student generative neural networks on the input data andthe output data generated by the teacher generative neural network usingadversarial loss, wherein a student generative neural network is trainedfor each object of the plurality of objects; receiving initial data on auser device; identifying, using image processing, an object in theinitial data; selecting a student generative neural network trained forthe identified object; and generating, on the user device, result databy modifying the initial data using the selected student generativeneural network.
 16. The system of claim 15, wherein the plurality ofstudent generative neural networks are trained using a discriminativeneural network that evaluates data output by the student generativeneural network compared with target data.
 17. The system of claim 16,wherein the target data is the identified output data of the teachergenerative neural network.
 18. The system of claim 16, wherein theplurality of student generative neural networks are trained using aclassification layer that receives input data from the discriminativeneural network.
 19. A non-transitory machine-readable storage mediumembodying instructions that, when executed by a machine, cause themachine to perform operations comprising: identifying input data andoutput data of a teacher generative neural network, the output datagenerated by modifying the input data using the teacher generativeneural network, wherein the input data comprises a plurality of objects;training a plurality of student generative neural networks on the inputdata and the output data generated by the teacher generative neuralnetwork using adversarial loss, wherein a student generative neuralnetwork is trained for each object of the plurality of objects;receiving initial data on a user device; identifying, using imageprocessing, an object in the initial data; selecting a studentgenerative neural network trained for the identified object; andgenerating, on the user device, result data by modifying the initialdata using the selected student generative neural network.
 20. Themethod of claim 1, wherein identifying further comprises: identifyingthe object using a neural network trained to identify the object.